<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // 打印等腰三角形
    var n = 9;
    debugger;
    var mid = parseInt(n / 2);  // 4
    var i = -mid;  // -4
    while (i <= mid) { // i<=4

        var k = 1;
        while(k <= Math.abs(i)){
            document.write("千");
            k++;
        }

        var j = 1;
        while(j <= n - 2 * Math.abs(i)){
            document.write("锋");
            j++;
        }

        document.write("<br>");
        i++;
    }

  

    




</script>
</html>